tone_synth object

This method rewinds the cursor to a previous position in milliseconds.

bool rewind_ms(double time)

Parameters:
time
Number of milliseconds to rewind.

Return value:
true on success, false on failure.

Remarks:
Rewinding is useful if you want to go back to a certain position relative to where the cursor is at present.

Example:
// Write a chord, two melody notes, then rewind to add some more.

tone_synth synth;

void main()
{
synth.waveform_type=2;
synth.note_ms("C4", 2000);
synth.note_ms("E4", 2000);
synth.note_ms("G4", 2000);
synth.waveform_type=3;
synth.note_ms("C5", 1000);
synth.rest_ms(1000);
synth.note_ms("C6", 1000);
synth.rewind_ms(666);
synth.note_ms("E5", 333);
synth.rest_ms(333);
synth.note_ms("G5", 333);
synth.rest_ms(333);
synth.write_wave_file("synth.wav");
}